package me.zhengjie.modules.system.service

import me.zhengjie.logging.annotation.Log
import me.zhengjie.modules.system.domain.Province
import me.zhengjie.modules.system.service.dto.ProvinceDTO
import me.zhengjie.modules.system.service.dto.ProvinceQueryCriteria
import jakarta.servlet.http.HttpServletResponse
import org.springframework.data.domain.Pageable
import java.io.IOException

/**
 * @author kuki
 * @date 2022-07-21
 */
interface ProvinceService {
    /**
     * 查询数据分页
     * @param criteria 条件参数
     * @param pageable 分页参数
     * @return Map<String></String>,Object>
     */
    fun queryAll(criteria: ProvinceQueryCriteria, pageable: Pageable?): Any?

    /**
     * 查询所有数据不分页
     * @param criteria 条件参数
     * @return List<ProvinceDTO>
    </ProvinceDTO> */
    fun queryAll(criteria: ProvinceQueryCriteria): List<ProvinceDTO?>?

    /**
     * 根据ID查询
     * @param id ID
     * @return ProvinceDTO
     */
    fun findById(id: Int): ProvinceDTO?
    fun create(resources: Province): ProvinceDTO?
    fun update(resources: Province)
    fun delete(id: Int)
    fun getProvincesAll(): List<Province?>
    fun getProvinceTree(provinces: List<Province?>): Any

    @Throws(IOException::class)
    fun download(all: List<ProvinceDTO>, response: HttpServletResponse?)
}